#ifndef MEASURE_SIZE_TRACKER_HANDLE_COUNT_VISITOR_H_
#define MEASURE_SIZE_TRACKER_HANDLE_COUNT_VISITOR_H_

#if defined(_MSC_VER)
#pragma once
#endif

#include "geometry_elements.h"
#include "boost\variant\static_visitor.hpp"

class handle_count_visitor : public boost::static_visitor<int>
{
public:

  handle_count_visitor(void)
  {
  }

  ~handle_count_visitor(void)
  {
  }

public:

  int operator()(const point_2& point) const
  {
    return 1;
  }

  int operator()(const segment_2& segment) const
  {
    return 2;
  }

  int operator()(const box_2& box) const
  {
    return 8;
  }

  int operator()(const angle_box_2& angle_box) const
  {
    return 8;
  }

  int operator()(const ring_2& ring) const
  {
    return 4;
  }

  int operator()(const arc_2& arc) const
  {
    return 2;
  }

  int operator()(const annulus_2& annulus) const
  {
    return 8;
  }

  int operator()(const annulus_arc_2& annulus_sector) const
  {
    return 4;
  }

  int operator()(const polygon_2& polygon) const
  {
    return polygon.size();
  }
};

#endif // MEASURE_SIZE_TRACKER_HANDLE_COUNT_VISITOR_H_